home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C ++ / Frameworks / MacZoop 1.6.5 / Basic Classes / Z Headers / ZPrinter.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-30  |  1.1 KB  |  68 lines  |  [TEXT/CWIE]

  1. /*************************************************************************************************
  2. *
  3. *
  4. *            ObjectMacZapp        -- a standard Mac OOP application template
  5. *
  6. *
  7. *
  8. *            ZPrinter.h            -- an object for doing printing
  9. *
  10. *
  11. *
  12. *
  13. *
  14. *            © 1996, Graham Cox
  15. *
  16. *
  17. *
  18. *
  19. *************************************************************************************************/
  20.  
  21. #pragma once
  22.  
  23.  
  24. #ifndef __ZPRINTER__
  25. #define    __ZPRINTER__
  26.  
  27. #include    <printing.h>
  28.  
  29. class    ZWindow;
  30.  
  31.  
  32. class    ZPrinter
  33. {
  34. protected:
  35.     ZWindow*    printWindow;
  36.     THPrint        macPrintH;
  37.     TPPrPort    printPort;
  38.     Rect        paperRect;
  39.     short        pH, pV, pageStart, pageEnd, pageNum;
  40.     Boolean        printInited;
  41.  
  42. public:
  43.     ZPrinter( ZWindow* aWindow = NULL );
  44.     virtual ~ZPrinter();
  45.     
  46.     
  47.     virtual void    Print();
  48.     virtual void    Print( ZWindow* aWindow );
  49.     virtual void    PageSetUp();
  50.     
  51.     inline THPrint    GetMacPrintRecord() { return macPrintH; };
  52.  
  53. protected:
  54.  
  55.     virtual void    PrintLoop();
  56.     virtual void    SetUpDocTitle( ZWindow* aWindow );
  57.     virtual void    SetDefault();
  58.     
  59.     WindowPtr    fakeWindow;
  60. };
  61.  
  62.  
  63. #define        kBadWindowPrintRefErr    301
  64. #define        kPrinterNotInitedErr    302
  65.  
  66. #define        kInitPrinterAlertID        134
  67.  
  68. #endif